package com.ct.commons.schedule.start;

import com.ct.commons.schedule.ScheduleManager;
import com.ct.commons.schedule.task.RedisDataTask;
import com.ct.commons.schedule.task.UserVipPeriodTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class RedisDataTaskStart implements CommandLineRunner {

    @Autowired
    private ScheduleManager scheduleManager;
    @Autowired
    private RedisDataTask redisDataTask;
    @Autowired
    private UserVipPeriodTask userVipPeriodTask;

    @Override
    public void run(String... args) throws Exception {
        //scheduleManager.startTask(IScheduledTask.REDIS_DATA_TOGGLE_KEY,redisDataTask,"*/1 * * * * ?");
        //scheduleManager.startTask(IScheduledTask.USER_VIP_PERDIOD_KEY,userVipPeriodTask,"*/5 * * * * ?");
    }
}
